class CreateMessages < ActiveRecord::Migration
  def self.up
    create_table :messages do |t|
      t.column :lock_version, :integer,   :null => false
      t.column :type,         :string,    :null => false, :limit => 9
      t.column :identity,     :string,    :null => false, :limit => 200
      t.column :link,         :string,    :null => false, :limit => 200
      t.column :body,         :text,      :null => false
      t.column :entry_id,     :integer,   :null => false
      t.column :created_at,   :timestamp, :null => false
      t.column :updated_at,   :timestamp, :null => false
    end
  end

  def self.down
    drop_table :messages
  end
end
